this._clickedSummaryItemAllocationChangedId = 0;
this._expandedSummaryItem = null;
this._summaryItemTitleWidth = 0;
+ this._pointerBarrier = 0;
// To simplify the summary item animation code, we pretend
// that there's an invisible SummaryItem to the left of the
this._notificationBin.width = primary.width;
this._summaryBin.x = 0;
this._summaryBin.width = primary.width;
+
+ if (this._pointerBarrier)
+ global.destroy_pointer_barrier(this._pointerBarrier);
+ this._pointerBarrier =
+ global.create_pointer_barrier(primary.x + primary.width, primary.y + primary.height - this.actor.height,
+ primary.x + primary.width, primary.y + primary.height,
+ 4 /* BarrierNegativeX */);
+
+
},
contains: function(source) {
this.actor.remove_style_class_name('in-overview');
}));
+ this._leftPointerBarrier = 0;
+ this._rightPointerBarrier = 0;
this._menus = new PopupMenu.PopupMenuManager(this);
this._leftBox = new St.BoxLayout({ name: 'panelLeft' });
this.actor.set_position(primary.x, primary.y);
this.actor.set_size(primary.width, -1);
+ if (this._leftPointerBarrier)
+ global.destroy_pointer_barrier(this._leftPointerBarrier);
+ if (this._rightPointerBarrier)
+ global.destroy_pointer_barrier(this._rightPointerBarrier);
+
+ this._leftPointerBarrier =
+ global.create_pointer_barrier(primary.x, primary.y,
+ primary.x, primary.y + this.actor.height,
+ 1 /* BarrierPositiveX */);
+ this._rightPointerBarrier =
+ global.create_pointer_barrier(primary.x + primary.width, primary.y,
+ primary.x + primary.width, primary.y + this.actor.height,
+ 4 /* BarrierNegativeX */);
+
this._leftCorner.relayout();
this._rightCorner.relayout();
},
return meta_display_get_grab_op (display) != META_GRAB_OP_NONE;
}
+/**
+ * shell_global_create_pointer_barrier
+ * @global: a #ShellGlobal
+ * @x1: left X coordinate
+ * @y1: top Y coordinate
+ * @x2: right X coordinate
+ * @y2: bottom Y coordinate
+ * @directions: The directions we're allowed to pass through
+ *
+ * If supported by X creates a pointer barrier.
+ *
+ * Return value: value you can pass to shell_global_destroy_pointer_barrier()
+ */
+guint32
+shell_global_create_pointer_barrier (ShellGlobal *global,
+ int x1, int y1, int x2, int y2,
+ int directions)
+{
+#if XFIXES_MAJOR >= 5
+ Display *xdpy;
+
+ xdpy = meta_plugin_get_xdisplay (global->plugin);
+
+ return (guint32)
+ XFixesCreatePointerBarrier (xdpy, DefaultRootWindow(xdpy),
+ x1, y1,
+ x2, y2,
+ directions,
+ 0, NULL);
+#else
+ return 0;
+#endif
+}
+
+/**
+ * shell_global_destroy_pointer_barrier
+ * @global: a #ShellGlobal
+ * @barrier: a pointer barrier
+ *
+ * Destroys the @barrier created by shell_global_create_pointer_barrier().
+ */
+void
+shell_global_destroy_pointer_barrier (ShellGlobal *global, guint32 barrier)
+{
+#if XFIXES_MAJOR >= 5
+ Display *xdpy;
+
+ g_return_if_fail (barrier > 0);
+
+ xdpy = meta_plugin_get_xdisplay (global->plugin);
+ XFixesDestroyPointerBarrier (xdpy, (PointerBarrier)barrier);
+#endif
+}
+
+
/**
* shell_global_add_extension_importer:
* @target_object_script: JavaScript code evaluating to a target object
int shell_global_get_primary_monitor_index (ShellGlobal *global);
MetaRectangle *shell_global_get_focus_monitor (ShellGlobal *global);
+guint32 shell_global_create_pointer_barrier (ShellGlobal *global,
+ int x1, int y1, int x2, int y2,
+ int directions);
+void shell_global_destroy_pointer_barrier (ShellGlobal *global,
+ guint32 barrier);
+
void shell_global_get_pointer (ShellGlobal *global,
int *x,
int *y,